[PATCH] Obtain actual 0-parameter count for OR(), AND() and 1-parameter functions
authorEike Rathke <erack@redhat.com>
Thu, 16 Feb 2023 19:20:31 +0000 (20:20 +0100)
committerBastien Roucariès <rouca@debian.org>
Sat, 28 Sep 2024 13:36:47 +0000 (13:36 +0000)
commitb8cca9a053236f1db8648bf96b9a2dd96c20c71f
tree27c748f3dfc5fe3872cd746edda98fe4852964ec
parent0d06783f26771742b19c0449ea02dcfd8320dfe1
[PATCH] Obtain actual 0-parameter count for OR(), AND() and 1-parameter functions

OR and AND for legacy infix notation are classified as binary
operators but in fact are functions with parameter count. In case
no argument is supplied, GetByte() returns 0 and for that case the
implicit binary operator 2 parameters were wrongly assumed.
Similar for functions expecting 1 parameter, without argument 1
was assumed. For "real" unary and binary operators the compiler
already checks parameters. Omit OR and AND and 1-parameter
functions from this implicit assumption and return the actual 0
count.

Change-Id: Ie05398c112a98021ac2875cf7b6de994aee9d882
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147173
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit e7ce9bddadb2db222eaa5f594ef1de2e36d57e5c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147129
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit d6599a2af131994487d2d9223a4fd32a8c3ddc49)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147132
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Gbp-Pq: Name sc-stack-parameter-count.diff
formula/source/core/api/token.cxx
sc/source/core/inc/interpre.hxx
sc/source/core/tool/interpr1.cxx
sc/source/core/tool/interpr3.cxx
sc/source/core/tool/interpr4.cxx